package com.starlink.model.util;

import com.starlink.model.dtomapper.MallPeripheryDtoMapper;
import com.starlink.model.domain.MallPeripheryDO;
import com.starlink.model.vo.MallPeripheryVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallPeripheryConvert {

    public static List<MallPeripheryVO> buildMallPeripheryVoList(List<MallPeripheryDO> mallPeripheryDOList) {
        if (CollectionUtils.isEmpty(mallPeripheryDOList)) {
            return Lists.newArrayList();
        }
        List<MallPeripheryVO> mallPeripheryVOList = new ArrayList<>();
        for (MallPeripheryDO mallPeripheryDO : mallPeripheryDOList) {
            mallPeripheryVOList.add(MallPeripheryDtoMapper.INSTANCE.do2VO(mallPeripheryDO));
        }

        return mallPeripheryVOList;
    }
}
